﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using MovieWebApp.DatabaseMarkup;
using System.Collections.Generic;

namespace MovieWebApp.DataAccess
{
    public class MovieAccess
    {
        private static MoviesDataContext mDB = new MoviesDataContext();

        public static List<Movies> GetMoviesByGenre(int genreID)
        {
            return mDB.GetMoviesByGenre(genreID).ToList();
        }

        public static List<Movies> GetAllMovies()
        {
            return mDB.GetAllMovies().ToList();
        }

        public static List<Movies> GetFeatMovies()
        {
            return mDB.GetFeatMovies().ToList();
        }

        public static List<Movies> GetAllMoviesBySearch(string searchString, string filterType)
        {
            return mDB.GetMoviesBySearch(searchString, filterType).ToList();
        }
    }
}
